package alarm;

public class DecoratedFilter extends AbstractFilter {
	private int accepted;
	private int rejected;
	private StringFilter wrappedFilter;
	public DecoratedFilter(String filterDescription, boolean withStatistics)
	{
		wrappedFilter = new StringFilter(filterDescription);
		accepted=0;
		rejected=0;
	}
	@Override
	public boolean accept(Event e)
	{
		if ( wrappedFilter.accept(e)) {
			accepted++;
			return true;
			}
		else
			rejected++;
		return false;
	}
}
